package com.the_ring.behavior.observer;

/**
 * @author: t22306139
 * @date: 2023/12/1  14:01
 */
public class MainTest {

    public static void main(String[] args) {

        WechatServer server = new WechatServer();

        Observer observer1 = new WechatUser("Han Mei");
        Observer observer2 = new WechatUser("Li Lei");

        server.registerObserver(observer1);
        server.registerObserver(observer2);
        server.sendInformation("微信小程序获取手机号即将收费！");

        System.out.println("---------------------------------");
        server.registerObserver(observer2);
        server.sendInformation("Java 是世界上最好用的语言！");
    }
}
